package com.whyx.project.openapi.business;

import com.alibaba.fastjson.JSONObject;

import java.text.SimpleDateFormat;

public class AddRoute extends DistributeEntity {

    //属性:0：更新线路（有相同区域 ID 更新，无相同区域追加） 1：追加线路
    public int flag;

    //标识ID
    public int signId;

    //线宽
    public int routeWidth;

    //业务值
    public int businessValue;

    //点数
    public int point;

    //经度
    public double Lng;

    //纬度
    public double Lat;

    public JSONObject toJSONString() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        JSONObject object = new JSONObject();
        object.put("flag",flag);
        object.put("signId",signId);
        object.put("routeWidth",routeWidth);
        object.put("businessValue",businessValue);
        object.put("point",point);
        object.put("Lng",Lng);
        object.put("Lat",Lat);
        object.put("distributeMsgTopic",distributeMsgTopic);
        object.put("msgId",msgId);
        object.put("devNo",devNo);
        object.put("requestId",requestId);
        object.put("userId",userId);
        object.put("userName",userName);
        object.put("distributeTime",sdf.format(distributeTime));
        object.put("serialNo",serialNo);
        return object;

    }
}
